The present invention relates to a digital gain controller and gain control method in a modulator-demodulator (MODEM).
A signal processing section in a conventional MODEM which is standardized by the CCITT recommendation V.29, V.27 ter is generally comprised of a software of digital signal processor (DSP).
In general, a signal level which is inputted into a reception-side MODEM from a communication line differs every time of communication. The signal level needs to be amplified to be a constant level so that precision of a signal processing can be improved by efficiently utilizing the limited dynamic range of the DSP. Otherwise, the data error rate is increased due to the low precision of the signal processing.
Therefore, an automatic gain controller (AGC) adjusting an amplifying gain is internally placed in the MODEM in response to a reception signal level.
In the MODEM V.29, V.27 ter, a training signal sequence is transmitted prior to a data transmission for initializing each signal processor in the reception-side MODEM. The PN segment in this training signal sequence is a signal for initializing an adaptive equalizer. If the PN segment is not correctly demodulated, the initialization cannot be processed. Therefore, a correctly demodulated signal needs to be obtained in a manner such that initializations for the signal processors except for the equalizer are completed prior to the PN segment. For this reason, the AGC gain must be converged before the PN segment. That is, an AGC having quick initial response is required.
However, efficiency of the DSP has been improved recently and the bit length of a signal to be processed and operation speed are both increased. Therefore, the signal processing which was conventionally performed outside of the DSP because of the precision of the signal processing to be obtained and the limitation of operation time to be spent can now be executed inside of the DSP. In the case of the AGC, an analog type AGC circuit has been conventionally arranged outside of the DSP, however, a digital type AGC generally comprises the DSP software at present.
FIG. 13 is a block diagram illustrating the structure of the conventional feedback type digital AGC. The character .delta. is a positive constant, P.sub.0 is a predetermined power, and r.sub.0 (n), r.sub.0 '(n), P.sub.0 (n), e.sub.0 (n), g.sub.0 (n) are signal values at each section (which will be described later) at the sampling time n, which respectively represent an input signal, output signal, mean power signal of output, error signal, and gain signal.
In FIG. 13, the gain signal g.sub.0 (n-1) which has been decided in one sampling earlier than n and stored in the delay 22 is multiplied by the input signal r.sub.0 (n). The output signal r.sub.0 '(n) is obtained by: EQU r.sub.0 '(n)=g.sub.0 (n-1).multidot.r.sub.0 (n) (1)
Then, this output signal r.sub.0 '(n) is squared by the multiplier 27 and averaged by the low pass filter (LPF) 26. The mean power signal P.sub.0 (n) is obtained by: EQU P.sub.0 (n)=E(r.sub.0 '(n).sup.2) (2)
The "E" represents "mean".
Then, an error signal e.sub.0 (n) of the above-mentioned mean power signal P.sub.0 (n) and the predetermined power P.sub.0 is calculated in the power error calculator 25 by: EQU e.sub.0 (n)=P.sub.0 -P.sub.0 (n) (3)
As apparent from the above equation (3), in the case where the mean power of the output signal r.sub.0 '(n) is greater than the predetermined power, the error signal e.sub.0 (n) becomes negative, while in the case where the mean power is smaller than the predetermined power, it becomes positive. Then, the error signal e.sub.0 (n) is multiplied by a constant in the constant multiplier 24, and a cumulative addition is performed by the adder 23 and delay 22.
The gain signal which is stored in the delay 22 is obtained as the following and used as a gain at the sampling time n+1: EQU g.sub.0 (n)=g.sub.0 (n-1)+.delta..multidot.e.sub.0 (n)=g.sub.0 (n-1)+.delta.[P.sub.0 -P.sub.0 (n)] (4)
As apparent from the equation (4), in the conventional AGC circuit, in the case where the mean power P.sub.0 (n) of the output signal is greater than the predetermined power P.sub.0, a gain is decreased. While in the case where the mean power P.sub.0 (n) is smaller than the predetermined power P.sub.0, a gain is increased. That is, in the AGC method, the algorithm which sequentially corrects a gain so that the error e.sub.0 (n) of the mean power P.sub.0 (n) of the output signal and predetermined power P.sub.0 approaches to zero is directed. If a value of the positive constant .delta. is appropriately selected, the mean power P.sub.0 (n) of the output signal is eventually converged into the predetermined power P.sub.0 by repeating this operation.
Since it is apparent from the equation (3) that e.sub.0 (n)=0, and from the equation (4), g.sub.0 (n)=g.sub.0 (n-1), the gain is converged into a certain value.
The traceability of the AGC gain has a relation with the positive constant .delta.. That is, a change of the gain for an operation is obtained from the equation (4) as the following: EQU .vertline.g.sub.0 (n)-g.sub.0 (n-1).vertline.=.delta..vertline.e.sub.0 (n).vertline. (5)
Therefore, if .delta. is set to a large value, the change of the gain is increased, and the traceability of the gain is quickened.
As described above, the characteristics that an initial response is as quick as possible and the gain is not fluctuated after the PN segment so that the correctly demodulated signal can be obtained are required for the AGC. Therefore, in general, the speed of the traceability before the PN segment is increased by changing the positive constant .delta., and the speed of traceability after the PN segment is decreased.
However, in the aforementioned conventional feedback type digital AGC, if the constant .delta. is increased to increase the speed of the traceability, large fluctuation is caused because the gain change becomes susceptible. In the worst case, the gain is diverged. That is, the conventional feedback type digital AGC has the limitation to increase the speed of the initial response since the gain is sequentially corrected.
Therefore, in the case where a signal level is quite large, the drawback is that the convergence of the gain cannot be completed before the PN segment and the adaptive equalizer cannot be initialized correctly.